<%@ page contentType="text/html; charset=UTF-8" language="java" import="com.config.SystemGlobals,com.util.*,java.util.*" errorPage="/error.jsp" %>
<%@ page import="com.beans.log.*" %>
<%@ page import="com.business.log.*" %>
<%@ page import="com.beans.photo.*" %>
<%@ page import="com.business.photo.*" %>
<%@ page import="com.beans.link.*" %>
<%@ page import="com.business.link.*" %>
<%@ page import="com.beans.user.*" %>
<%@ page import="com.business.user.*" %>
<%  UserListBus uis=new UserListBus();
	LogListBus llb=new LogListBus();
	LogReplyBus lrb=new LogReplyBus();
	LogTypeBus ltb=new LogTypeBus();
	PhotoTypeBus ptb=new PhotoTypeBus();
	List logList;
	PhotoListBus plb=new PhotoListBus();
	List photoList;
	String phototypeId=request.getPathInfo();	
	StringTokenizer t=new StringTokenizer(phototypeId,"/");
	int number=t.countTokens();
	String username=t.nextToken();	
	UserInfo ui=uis.getUserInfo(username);
	String title=username+"的图片、相册列表";  
%>
<%@ include file="/header.jsp"%>
<body>
<div id=container>
<%@ include file="/top.jsp"%>
<div id=Tbody>
<div id=mainContent>
<div id=innermainContent>
<div id=mainContent-topimg></div>
<DIV class=Content-body style="TEXT-ALIGN: left">
<%
   if(t.hasMoreTokens()) {
        phototypeId=t.nextToken();
    	phototypeId=phototypeId.replace(".html","");	
		int id=Integer.parseInt(phototypeId);
     	PhotoType pt=ptb.getPhotoTypeById(id);	
		photoList=plb.getAllPhotoByTypeID(id);
%>
您选择的相册是:<font color=red><%=pt.getPhototypeName()%></font>,共有<%=photoList.size()%>张图片
<br/>
描述：<%=pt.getPhototypeMemo()%>
<%
if(photoList==null||photoList.size()==0) {
%>
<center color="red">没有图片<br/>
<a href="javascript:history.back()">返回</a></center>
<%
} else {
%>
<table cellSpacing=10 cellPadding=10 width="100%">
<tbody>
<%
for(int i=0;i<photoList.size();i++) {
PhotoDetail pd=(PhotoDetail)photoList.get(i);
%>
  <tr bgcolor="#ffffCC" border="0">
<td width="50%"><a href="photo/temp/<%=pd.getPhotoNo()%>.html"><b><%=pd.getPhotoName()%></b>
<br/>
<image alt="<%=pd.getPhotoMemo()%>"  src="<%=basePath+pd.getPhotoUrl()%>" width="100" height="100" border="0" ></a><br/>
<%=pd.getAddTime()%><br/><a href="<%=basePath+pd.getPhotoUrl()%>">察看原图</a></td>
<%		i++;
		if(i<photoList.size()){
		
		 pd=(PhotoDetail)photoList.get(i);
%>
		<td width="50%"><a href="photo/temp/<%=pd.getPhotoNo()%>.html"><b><%=pd.getPhotoName()%></b><br/>
<image alt="<%=pd.getPhotoMemo()%>" src="<%=basePath+pd.getPhotoUrl()%>" width="100" height="100" border="0" ></a><br/>
<%=pd.getAddTime()%><br/><a href="<%=basePath+pd.getPhotoUrl()%>">察看原图</a></td></tr>
		<%}else{%></tr>
<%
		}
	}
%>
		
</tbody>
</table>
<center><a href="javascript:history.back()">返回</a></center>
<%	
	}
}else{
	List phototypeList=ptb.getAllTypes(username);
%>
	<b>请选择您所要浏览的相册：</b><br /><br/>
	
<%
	for(int i=0;i<phototypeList.size();i++){
	PhotoType pt=(PhotoType)phototypeList.get(i);
	int id=Integer.parseInt(pt.getPhototypeId());
	photoList=plb.getAllPhotoByTypeID(id);
%>
<a href="photolist/<%=username%>/<%=pt.getPhototypeId()%>.html">
<b><%=pt.getPhototypeName()%></b>
<br/>
描述：<%=pt.getPhototypeMemo()%></a>
<br/>统计：共有<%=photoList.size()%>张图片
<br/>
<hr color="#66CC33" size="1px" style="border-style:dashed"/>
<%
	}
}
%>
</div>
<div id=mainContent-bottomimg></div></div></div>
<%@ include file="/sidebar.jsp"%>
<%@ include file="/footer.jsp" %>
</body>
</html>
